# store as part of the device config.
dev_uuid = sxp.child_value(config, 'uuid')
dev_type, dev_cfg = self['devices'][dev_uuid]
- is_bootable = dev_cfg.get('bootable', False)
+ is_bootable = dev_cfg.get('bootable', 0)
config.append(['bootable', int(is_bootable)])
sxpr.append(['device', config])
pass
if dev_type == 'vbd':
- dev_info['bootable'] = False
+ dev_info['bootable'] = 0
if dev_info.get('dev', '').startswith('ioemu:'):
dev_info['driver'] = 'ioemu'
else:
if dev_type == 'vbd' and not target[param]:
# Compat hack -- this is the first disk, so mark it
# bootable.
- dev_info['bootable'] = True
+ dev_info['bootable'] = 1
target[param].append(dev_uuid)
elif dev_type == 'tap':
if 'vbd_refs' not in target:
if not target['vbd_refs']:
# Compat hack -- this is the first disk, so mark it
# bootable.
- dev_info['bootable'] = True
+ dev_info['bootable'] = 1
target['vbd_refs'].append(dev_uuid)
elif dev_type == 'vfb':
dev_info['uname'] = cfg_xenapi.get('image', '')
dev_info['dev'] = '%s:%s' % (cfg_xenapi.get('device'),
old_vbd_type)
- dev_info['bootable'] = cfg_xenapi.get('bootable', False)
- dev_info['driver'] = cfg_xenapi.get('driver')
+ dev_info['bootable'] = int(cfg_xenapi.get('bootable', 0))
+ dev_info['driver'] = cfg_xenapi.get('driver', '')
dev_info['VDI'] = cfg_xenapi.get('VDI', '')
if cfg_xenapi.get('mode') == 'RW':